#include "arch.h"

#ifdef __WINDOWS
void open(const unsigned char *name, int flag)
{
    printf("open function in windows,open %s, %d\n", name, flag);
}

void close(int flag)
{
    printf("close function in windows, flag: %d\n",flag);
}
#else
void open(const unsigned char *name, int flag)
{
    printf("open function in linux,open %s, %d\n", name, flag);
}

void close(int flag)
{
    printf("close function in linux, flag: %d\n",flag);
}

#endif

static const struct network_ops nt_ops = {
    .open = open,
    .close = close
};

void network_test()
{
    nt_ops.open((const unsigned char*)"ok", 0);
    nt_ops.close(0);
}